package com.neusoft.ysu.populationmanagement.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.neusoft.ysu.populationmanagement.vo.VFloPop;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;


/**
 * <p>
 * 
 * </p>
 *
 * @author zzh
 * @since 2025-06-13
 */

@TableName("flo_pop")
@Data
public class FloPop implements Serializable {

    private static final long serialVersionUID = 1L;

    public FloPop(){}
    public FloPop(VFloPop vFloPop) {
        this.popId = vFloPop.getId();
        this.livedate = vFloPop.getLivedate();
        this.livereason = vFloPop.getLivereason();
        this.liveaddress = vFloPop.getLiveaddress();
        this.isDelete = vFloPop.getIsDelete();
    }

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long popId;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    private LocalDate livedate;

    private String livereason;

    private String liveaddress;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    private Integer isDelete;

}
